package io.gitee.zhangbinhub.admin.oauth.base


import io.swagger.v3.oas.annotations.media.Schema
import jakarta.persistence.Column
import jakarta.persistence.MappedSuperclass
import jakarta.persistence.Transient

/**
 * @since JDK 11
 */
@MappedSuperclass
abstract class OauthBaseTreeEntity<T : OauthBaseTreeEntity<T>>(
    @Column(length = 36, nullable = false)
    @field:Schema(description = "上级ID")
    var parentId: String = "",
    @Transient
    @field:Schema(description = "子列表")
    var children: MutableList<T> = mutableListOf()
)